//
//  FMDBHelper.swift
//  Sqlite-FDBM
//
//  Created by 朱益锋 on 15/12/24.
//  Copyright © 2015年 朱益锋. All rights reserved.
//

import UIKit

class FMDBHelper: NSObject {
    
    class func getDataBaseQueue()->FMDatabaseQueue{
        //创建数据库文件路径(据说保存在document会被拒)
        var path = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.CachesDirectory, NSSearchPathDomainMask.UserDomainMask, true)[0]
        print(path)
        path = path + "/userTable.sqlite"
        //初始化队列(默认创建时打开)
        let queue = FMDatabaseQueue(path: path)
        return queue
    }
}
